<?php $this->load->view('header');?>
</div>
<div id="content">
    
    <div id="sidebar_right">
    	<?php $this->load->view('right_sidebar', $right_sidebar); ?>            
    </div>
    
   		<article class="sidebar_right">
        	<h2 class="blog_post_title"><a href="blog-article.html"><?php echo $article['judul'];?></a></h2>
			<div class="blog_post_info_div">
				<span class="blog_post_info">Diposting oleh <?php echo $article['writer'];?>, Pada <?php echo timestamp_to_date_time($article['waktu_posting']); ?></span>
				<span class="blog_post_info_right"><?php echo count($komentars); ?> komentar</span>
			</div>
			<img class="blog_post_picture float" style="width:auto !important; height:auto !important" src="<?php echo base_url()."images/article_images/".$article['foto'];?>">
			<?php echo $article['isi']; ?>
        </article>
        
        <!--<article class="sidebar_right">
        	<div class="share_this_article">
            	<span>Berbagi artikel: </span>
                <ul>
                    <li><a href="#"><img src="<?php echo base_url();?>images/social_icons/facebook.png" alt="Facebook" /></a></li>
                    <li><a href="#"><img src="<?php echo base_url();?>images/social_icons/flickr.png" alt="Flickr" /></a></li>
                    <li><a href="#"><img src="<?php echo base_url();?>images/social_icons/linkedin.png" alt="Linkedin" /></a></li>
                    <li><a href="#"><img src="<?php echo base_url();?>images/social_icons/twitter.png" alt="Twitter" /></a></li>
                    <li><a href="#"><img src="<?php echo base_url();?>images/social_icons/youtube.png" alt="Youtube" /></a></li>
                </ul>
            </div>
        </article>-->
        
        <article class="sidebar_right">
        	<div id="article_comments">
            	<div class="title">
                	<span><?php echo count($komentars);?> komentar </span>
                </div>
                <?php 
				foreach($komentars as $komentar){ ?>
				<div class="comment">
					<img src="<?php echo base_url()."images/user_avatars/".$komentar['avatars_comment_writer'];?>" alt="" />
					<a href="<?php echo base_url()."users/index/".$komentar['id_user'];?>" class="comment_title"><?php echo $komentar['comment_writer'];?></a>
					<span class="comment_title_right"><?php echo elapsed_time($komentar['waktu_posting']);?></span>
					<p><?php echo $komentar['isi'];?></p>
				</div>
				<?php }?>          
            </div>
		</article>
		<article class="sidebar_right">
			<?php if($user){ ?>
			<form method="POST" class="contact_form">
				<span>Masukkan Komentar Anda:</span>
				<textarea name="komentar"></textarea>
				<input type="submit" value="submit" name="submit_komentar">
			</form>
			<?php }else{
				echo "<p style='color:red'>Anda harus login terlebih dahulu sebelum memasukkan komentar.</p>";
			} ?>
		</article>
        
	<div class="cleaner"></div>
    </div>
    <div class="cleaner"></div>
<?php $this->load->view('footer', $right_sidebar);?>